using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace OA.Model
{

    public class EventsNotify: Base
    {

        /// <summary>
        /// 事件编号
        /// </summary>
        public virtual string EventCode { get; set; }

        /// <summary>
        /// 用户编号
        /// </summary>
        public virtual string UserName { get; set; }

        /// <summary>
        /// 所属事件
        /// </summary>
        public virtual Events Events { get; set; }

        /// <summary>
        /// 用户
        /// </summary>
        public virtual Manager Manager { get; set; }

        #region 联合主键重写方法
        public override bool Equals(object obj)
        {
            var ret = false;
            if (obj is EventsNotify)
            {
                EventsNotify pk = obj as EventsNotify;
                ret = (this.EventCode == pk.EventCode && this.UserName == pk.UserName);
            }
            return ret;

        }

        public override int GetHashCode()
        {
            return (this.EventCode + "_" + this.UserName).GetHashCode();
        }
        #endregion
    }
}
